<template>
	<view class="u-page">
		<view class="">
			<view class="search">
				<u-search v-model="searchVal" placeholder="请输入姓名或者地址等信息" searchIconColor="#007aff" :show-action="false"
					@search="searchElder()">
				</u-search>
				<uni-icons size="35" color="#007aff" type="camera" class="camera"></uni-icons>
			</view>

		</view>
		<view style="margin: 10px">
			<uni-list>
				<uni-list-item showArrow title="杨运英" rightText="查看老人状态" clickable @click="toHealthInfo" />
				<uni-list-item showArrow title="老人2" rightText="查看老人状态" clickable @click="onClick" />
				<uni-list-item showArrow title="老人3" rightText="查看老人状态" clickable @click="onClick" />
				<uni-list-item showArrow title="老人4" rightText="查看老人状态" clickable @click="onClick" />
				<uni-list-item showArrow title="老人5" rightText="查看老人状态" clickable @click="onClick" />
			</uni-list>
		</view>
<!-- 		<button class="add" type="primary" @click="addElder()">
			<text>添加老人</text>
		</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchVal: "",
			};
		},
		methods: {
			searchElder(){
				console.log("搜索老人")
			},
			addElder(){
				console.log("添加老人")
			},
			toHealthInfo() {
				uni.navigateTo({
					url:"/pages/homepage/ElderHealthInfo/index"
				})
				return;
			}
		}
	}
</script>

<style>
	page {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		background-color: #fff;
		min-height: 100%;
		height: auto;
	}

	.search {
		/* margin: 10px 2px 0; */
		margin: 10px;
		display: flex;
		justify-content: center;
	}

	.camera {
		margin-left: 20px;
		margin-right: 10px;
	}

	.add {
		position: fixed;
		bottom: 50px;
		left: 225rpx;
		width: 300rpx;
	}
</style>